<?php $this->renderPartial('_tabs'); ?>
<div class="grid_16">
    <div class="admin-agency form">
		<?php
		$form = $this->beginWidget('CActiveForm', array(
			'id' => 'admin-agency-myincome-form',
			'enableAjaxValidation' => false,
			'htmlOptions' => array()
		));
		?>
        <div class="section">
			<div class="block">
				<table class="form-table">
					<tr>
						<th scope="row" width="250">
							<label>'Completed Transactions' shows</label>
						</th>
						<td>
							<?php
							echo CHtml::dropDownList('AgencySetting[Commission][MyIncome][CompletedTransactionsMode]', $agency->settings['Commission']['MyIncome']['CompletedTransactionsMode'], array(
								'NetCommissionsFullyCollected' => 'Invoiced Transactions that are Fully Collected',
								'InvoiceFullyPaid' => 'Invoiced Transactions that are Fully Paid by Client',
							));
							?>
						</td>
					</tr>
					<tr>
						<th scope="row" width="250">
							<label>Show 'Sales' Income Tab</label>
						</th>
						<td>
							<?php
							echo CHtml::checkBox('AgencySetting[Commission][MyIncome][ShowSalesIncomeTab]', $agency->settings['Commission']['MyIncome']['ShowSalesIncomeTab'], array('uncheckValue' => 0));
							?>
						</td>
					</tr>
					<tr>
						<th scope="row" width="250">
							<label>Show 'Overriding' Income Tab</label>
						</th>
						<td>
							<?php
							echo CHtml::checkBox('AgencySetting[Commission][MyIncome][ShowOverridingIncomeTab]', $agency->settings['Commission']['MyIncome']['ShowOverridingIncomeTab'], array('uncheckValue' => 0));
							?>
						</td>
					</tr>
					<tr>
						<th scope="row" width="250">
							<label>Default 'My Income' Tab</label>
						</th>
						<td>
							<?php
							echo CHtml::dropDownList('AgencySetting[Commission][MyIncome][DefaultIncomeTab]', $agency->settings['Commission']['MyIncome']['DefaultIncomeTab'], array('sales' => 'Sales', 'tier' => 'Overriding'));
							?>
						</td>
					</tr>
				</table>
				<table class="form-table">
					<th>
						<button type="submit" class="link-button round_all no-margin">
							<span>Save Changes</span>
						</button>
					</th>
				</table>
			</div>
        </div>
		<?php $this->endWidget(); ?>
    </div>
</div>